import jdk.internal.org.objectweb.asm.tree.MultiANewArrayInsnNode;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LEGION
 * Date: 2023-04-23
 * Time: 11:31
 */
public class J230423 {
    public static void main(String[] args) {
        int[] arr = {1,2,34,3,4,5,7,23,12};
        boolean fla = san(arr);
        System.out.println(fla);
    }
    public static boolean san(int[] arr1){
        int count = 0;
        for (int i = 0; i < arr1.length; i++) {
            if(arr1[i] %2 != 0){
                count ++;
                if(count == 3)
                    return true;
            }else {
                count = 0;
            }
        }
        return false;
    }
    public static void main7(String[] args) {
        int[] arr = {3,2,3};
        Arrays.sort(arr);
        int a = paixu(arr);
        System.out.println(a);
    }
    public static int paixu(int[] arr){
        return arr[arr.length/2];
    }


    public static void main6(String[] args) {
        int[] arr = {4,1,2,1,2};
        int a = chong(arr);
        System.out.println(a);
    }
    public static int chong(int[] arr){
        int num = 0;
        for (int i = 0; i < arr.length; i++) {
            num ^=arr[i];
        }
        return num;
    }
    public static void main5(String[] args) {
        int[] nums = {2,7,11,15};
        int[] arr1 = fun(nums);
        System.out.println(Arrays.toString(arr1));
    }
    public static int[] fun(int[] arr){
        for (int i = 0; i < arr.length; i++) {
            int[] arr1 = {};
            if(arr[i] + arr[i+1] == 9){
                return new int[]{i,i+1};
            }
        }
        return new int[]{-1,-1};
    }
    public static void main4(String[] args) {
        int[] arr = {1,2,8,7,5,3,4,8,9,};
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr.length - i - 1; j++) {
                if (arr[j] > arr[j+1]) {
                    int tmp = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1] = tmp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
    public static void main3(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        int[] fan = shunxu(arr);
        System.out.println(Arrays.toString(fan));
    }
    public static int[] shunxu(int[] arr){
        int j = 0;
        int[] arr1 = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] %2 != 0){
                arr1[j] = arr[i];
                j++;
            }
        }
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] % 2 == 0) {
                arr1[j] = arr[i];
                j++;
            }
        }
        return arr1;
    }
    public static void main2(String[] args) {
        int[] zu = {1,2,3,4,5};
        double a = avg(zu);
        System.out.println(a);
    }
    public static double avg(int[] arr){
        int a = 0;
        for (int i = 0; i < arr.length; i++) {
            a += arr[i];
        }
        return (double) a/(double) arr.length;
    }
    public static void main1(String[] args) {
        int[] arr= {1,2,3};
        int[] shu = transform(arr);
        System.out.println(Arrays.toString(shu));
    }
    public static int[] transform(int[] arr){
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i]*2;
        }
        return arr;
    }
}
